package com.example.myapplication.SmartElderly.Fragment;

import android.content.Intent;
import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.example.myapplication.R;
import com.example.myapplication.SmartElderly.LookFragmentActivity;

public class Smart_lookFragment extends Fragment {


    private View view;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.fragment_smart_look, container, false);
        ImageView img = view.findViewById(R.id.img);
        RelativeLayout re = view.findViewById(R.id.re);
        RelativeLayout re2 = view.findViewById(R.id.re2);
        RelativeLayout re3 = view.findViewById(R.id.re3);
        RelativeLayout re4 = view.findViewById(R.id.re4);


        re.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent =  new Intent(Smart_lookFragment.this.getActivity(), LookFragmentActivity.class);
                Smart_lookFragment.this.getActivity().startActivity(intent);
            }
        });

        re2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent =  new Intent(Smart_lookFragment.this.getActivity(), LookFragmentActivity.class);
                Smart_lookFragment.this.getActivity().startActivity(intent);
            }
        });

        re3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent =  new Intent(Smart_lookFragment.this.getActivity(), LookFragmentActivity.class);
                Smart_lookFragment.this.getActivity().startActivity(intent);
            }
        });

        re4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent =  new Intent(Smart_lookFragment.this.getActivity(), LookFragmentActivity.class);
                Smart_lookFragment.this.getActivity().startActivity(intent);
            }
        });


        img.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Smart_lookFragment.this.getActivity().finish();
            }
        });
        return view;
    }
}